package com.ruoyi.web.controller.frontend;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import com.ruoyi.common.core.controller.BaseController;

/**
 * 前端站点页面
 * 
 * @author HG
 */
@Controller
public class FrontendIndexController extends BaseController
{
    /** 前端首页（商品浏览） */
    @GetMapping("/home")
    public String home()
    {
        return "frontend/index";
    }

    /** 商品列表页 */
    @GetMapping("/goods")
    public String goodsList()
    {
        return "frontend/goods/list";
    }

    /** 商品详情页 */
    @GetMapping("/goods/{id}")
    public String goodsDetail(@PathVariable("id") Long id, ModelMap mmap)
    {
        mmap.put("goodsId", id);
        return "frontend/goods/detail";
    }

    /** 发布商品页（需登录） */
    @GetMapping("/goods/publish")
    public String publishGoods()
    {
        return "frontend/goods/publish";
    }
}


